function enabledQuestionDialog(
    {
        questionTitle,
        questionId,
        callback = Function()
    }
) {
    if (!questionId) {
        return $.toast("问题ID不能为空");
    }

    const $dialogWidget = $.dialog(
        questionTitle ? "是否确定启用问卷(" + questionTitle + ")" : "是否确定启用该问卷",
        {
            title: "启用问卷",
            width: "300px",
            ok() {
                updQuestion({
                    questionId,
                    disableFlag: 0,
                }, res => {
                    if (res.Code !== 10000) {
                        return $.toast(res.Message);
                    }

                    $dialogWidget.remove();
                    $.toast("启用成功");
                    callback();
                })
            }
        }
    )

    function updQuestion(data, callback = Function()) {
        return $.sApi({
            data,
            url: "/api/Question/updQuestion"
        }, callback)
    }
}